# -*- coding: utf-8 -*-
# @Author	: brotherbaby
# @Date		: 2021-04-25 18:09:30 
# @Last Modified by:   brotherbaby
# @Last Modified time: 2021-04-25 18:09:30
# Thanks for your comments!

import sys
import codecs
sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())

import logging
import initlogging

from src.api import initialize_web_app
from src.config import CONF
from src.db_proxy.connect import DbConnector

logger = logging.getLogger("main")


def main():
    logger.info("starting...")
    if CONF.bizdb:
        DbConnector(CONF.bizdb)
    # api server
    initialize_web_app()


if __name__ == "__main__":
    main()
